﻿#parse("partials/header.html") #parse("partials/sidebar.html")
<script type="text/javascript">
    $(document).ready(function () {
        var oTable = $('#datalist').dataTable({
            "sScrollX": "100%",
            "sScrollXInner": "1300px",
            "bScrollCollapse": true,
            "bSort": false,
            "bAutoWidth": false,
            "sPaginationType": "full_numbers",
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "tablelist",
            "aoColumns": [
                            { "mDataProp": "DoctorId" },
                            { "mDataProp": "DoctorName" },
                            { "mDataProp": "Specialist" },
                            { "mDataProp": "Location" },
                            { "mDataProp": "Monday" },
                            { "mDataProp": "Tuesday" },
                            { "mDataProp": "Wednesday" },
                            { "mDataProp": "Thursday" },
                            { "mDataProp": "Friday" },
                            { "mDataProp": "Saturday" },
                            { "mDataProp": "Sunday" }

                        ],
            "aoColumnDefs": [
                                {
                                    "fnRender": function (o) {
                                        return "<center><a class='tooltip' title='select this record' href='doctorsscheduleselected/?doctorid=" + o.aData['DoctorId'] + "'><img src='/images/Icons/table.png'/></a> </center>";
                                    },
                                    "aTargets": [0],
                                    "sWidth": "10"
                                },
                                {
                                    "aTargets": [1],
                                    "sWidth": "200"
                                },
                                {
                                    "aTargets": [2],
                                    "sWidth": "200"
                                },
                                {
                                    "aTargets": [3],
                                    "sWidth": "200"
                                }
                        ],
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push({ "name": "IdHospital", "value": $('#IdHospital').val() });
                aoData.push({ "name": "IdSpecialist", "value": $('#IdSpecialist').val() });
                aoData.push({ "name": "TextBoxDoctorName", "value": $('#TextBoxDoctorName').val() });
                jQuery.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": "tablelist",
                    "data": aoData,
                    "success": fnCallback

                });
            }
        });

        $('#buttonSearch').click(function () { oTable.fnDraw(); });


    });




</script>
<!--mws-container Start-->
<style>
    div#datalist_filter
    {
        display: none;
    }
    div#datalist_length
    {
        display: none;
    }
    .mws-table thead
    {
        margin-top: -10px;
    }
</style>
<div id="mws-container" class="clearfix">
    <!-- Inner Container Start -->
    <div class="container">
        <!-- Panels Start -->
        <div class="mws-panel grid_8">
            <div class="title-caption">
                <h5>$headerinformation - Appointment</h5>
            </div>
            <div class="mws-panel-header">
                <span class="mws-i-24 i-table-1">Search Schedule</span>
            </div>
            <div class="mws-panel-body">
                <!--               <div class="mws-panel-toolbar top clearfix">
                    <ul>
                        <li><a class="mws-ic-16 ic-accept" href="/opd/fo/registration/index" title="Accept">
                            Search Patient</a></li>
                        <li><a class="mws-ic-16 ic-accept" href="/opd/fo/registration/register" title="Accept">
                            New Patient Registration</a></li>
                    </ul>
                </div>-->
                <br />
                <div class="mws-form" action="#">
                    <div class="mws-form-inline">
                        <div class="mws-form-row">
                            <label>
                                Hospitals</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlHospitals
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Specialist</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlSpecialists
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Doctor Name</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input id="TextBoxDoctorName" type="text" class="mws-textinput" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br />
                    <div class="mws-button-row">
                        <input id="buttonSearch" type="submit" value="Search" class="mws-button red" />
                    </div>
                </div>
                
                <table cellpadding="0" cellspacing="0" border="0" class="mws-table" id="datalist">


                    <thead>
                        <tr>
                            <th style="width: 10px; text-align: center">
                            Action
                            </th>
                            <th style="text-align: center">
                                Doctor Name
                            </th>
                             <th style="text-align: center">
                                Specialist
                            </th>
                            <th style="text-align: center">
                                Location
                            </th>
                            <th style="text-align: center">
                                Monday
                            </th>
                            <th style="text-align: center">
                                Tuesday
                            </th>
                            <th style="text-align: center">
                                Wednesday
                            </th>
                            <th style="text-align: center">
                                Thursday
                            </th>
                            <th style="text-align: center">
                                Friday
                            </th>
                            <th style="text-align: center">
                                Saturday
                            </th>
                            <th style="text-align: center">
                                Sunday
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td colspan="10" class="dataTables_empty">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!-- Panels End -->
    </div>
    <!-- Inner Container End -->
</div>
<!--mws-container End-->
#parse("partials/footer.html")